<template>
  <div>
    <login-app v-show="switchAppType" @switchApp="switchApp" />
    <register-app v-show="!switchAppType" @switchApp="switchApp" />
  </div>
</template>

<script>
import LoginApp from "./login";
import RegisterApp from "./register";
import { ref } from "vue";

export default {
  name: "unauthenticated-app",
  components: { RegisterApp, LoginApp },
  setup() {
    const switchAppType = ref(true);
    const switchApp = (type) => {
      switchAppType.value = type;
    };
    return { switchApp, switchAppType };
  },
};
</script>
